<!DOCTYPE html>
<html>
<head>
	<title>
	</title>
</head>
<body>
	<canvas id="canvas" width ="500" height="500" style="border:1px solid #000">
		
	</canvas>

</body>
</html>

<script type="text/javascript">
	var canvas = document.getElementById('canvas');
	var context = canvas.getContext('2d');
	var gr = context.createRadialGradient(200,200,10,200,200,150);
	gr.addColorStop(0,'red')
	gr.addColorStop(0.5,'orange')
	gr.addColorStop(1,'cyan')
	context.fillStyle = gr
	context.arc(200,200,150,0,Math.PI*2)
	context.fill()
	//圆形渐变//


</script>